<html>
<head>
<title>TwilioChlorine</title>

<!--
TwilioChlorine 1.0 by Roy Leban (roy@royleban.com)

(C) Copyright 2009 by Roy Leban

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software,
and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

This entire copyright notice and permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-->

<!-- See Chlorine.js for Usage Notes -->

</head>
<body>
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
  google.load("jquery", "1.3.2");
  google.load("jqueryui", "1.7.2");
</script>
<script type="text/javascript" src="chlorine.js"></script>

<style>
.resultURL { background:#CCDDEE; font-weight: bold; }
.resultParams { background:#CCDDEE; font-weight: bold; }
.resultStatus { background:#CCDDEE; font-weight: bold; }
.result { background:#DDEEFF; }
</style>

<!-- The following should go after any static HTML -->
<script type="text/javascript">
chlorineConfig = {           // Twilio configuration
    "forms": {
        "Gather action":  {"submitTypeAttribute": "method", "fields": ["Digits"]},
        "Record action":  {"submitTypeAttribute": "method", "fields": ["RecordingURL", "Duration", "Digits"]},
        "Record transcribeCallback":  {"fields": ["TranscriptionText", "TranscriptionStatus", "TranscriptionUrl", "RecordingURL"]}
        },
    "common": ["Caller", "Called", "CallStatus"]
        // Omitted fields (add these in if you need them)
        // "CallSid", "CallGuid", "AccountGuid", "AccountSid"
        // "CallerCountry", "CallerState", "CallerCity", "CalledZip", 
        // "CalledCountry", "CalledState", "CalledCity", "CallerZip",
    };

setupChlorine();
</script>
</body>
